﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.IO;
using ZYStudios.Helper;

namespace ZYStudios.Controllers
{
    public class CheckCodeController : Controller
    {
        //
        // GET: /CheckCode/

        public ActionResult Index()
        {
            string aCheckCode = CheckCodeImage.GenerateCheckCode();
            Session["CheckCode"] = aCheckCode;
            MemoryStream ms = CheckCodeImage.CreateCheckCodeImage(aCheckCode);
            return File(ms.ToArray(), @"image/gif");
        }

    }
}
